@echo off
rem deploy mjfeed after hudson build

set CATALINA_HOME="D:\tomcat1"
set CATALINA_BASE="D:\tomcat1"

call "D:\tomcat1\bin\shutdown.bat"
rem wait 30 seconds
ping -n 30 127.1>nul
del /f /q "D:\tomcat1\webapps\mjfeed.war"
rd /s /q "D:\tomcat1\webapps\mjfeed"
xcopy "C:\Users\Administrator\.hudson\jobs\mjfeed\workspace\target\mjfeed.war" "D:\tomcat1\webapps\"

call "D:\tomcat1\bin\startup.bat"
ping -n 60 127.1>nul
call "D:\tomcat1\bin\shutdown.bat"
call "D:\tomcat1\bin\startup.bat"

pause